/*
 * Created: Author: Ivan Lampert / Date: Jan 25, 2015
 * 
 * Changed: $Author: ac280593@gmail.com $ / $Date: 2015-06-04 21:24:45 -0300 (Thu, 04 Jun 2015) $
 */
package com.cpm.context;

import com.cpm.ServiceLocator;
import com.cpm.view.Alerts;
import com.cpm.wrapper.SolidObjects;
import java.io.Serializable;

public class SystemLogger implements Serializable {
    private static final long serialVersionUID = 2618291833124935021L;

    private SystemLogger() {}
    
    public static void printException(Throwable exception) {
        logException(exception);
        
        Alerts.getInstance().showError(exception);
    }
    
    private static void log(String log) {
        //TODO: gerar no arquivo de logs
        System.out.println(log);
    }
    
    public static void logException(Throwable exception) {
        //TODO: gerar no arquivo de logs
        SolidObjects.notNull(exception).printStackTrace(System.err);
    }
    
}
